home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 6647 / 6647.xpi / chrome / httpfox.jar / content / Utils.js < prev    next >
Text File  |  2009-04-10  |  26KB  |  708 lines

  1. /*
  2.     HttpFox - An HTTP analyzer addon for Firefox
  3.     Copyright (C) 2008 Martin Theimer
  4.     
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.     
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.     
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. if(!net) var net={};
  21. if(!net.decoded) net.decoded={};
  22. if(!net.decoded.utils) net.decoded.utils={};
  23.  
  24. net.decoded.utils = {
  25.  
  26.     // Date and Time stuff
  27.     formatTimeDifference: function(startTime, endTime)
  28.     {
  29.         if (startTime == null || endTime == null)
  30.         {
  31.             return "*";
  32.         }
  33.         
  34.         // values ok
  35.         var diff = endTime - startTime;
  36.         
  37.         var string = "";
  38.         string += diff / 1000;
  39.         var dummy = string.split(".");
  40.         while (dummy[1].length < 3) dummy[1] += "0";
  41.         var after = (dummy[1]) ? dummy[1] : "000";
  42.         return dummy[0] + "." + after;
  43.     },
  44.     
  45.     dateFromUnixTimestamp: function(timestamp)
  46.     {
  47.         return new Date(timestamp * 1000);
  48.     },
  49.     
  50.     formatDateTime: function(myDate)
  51.     {
  52.         if (myDate instanceof Date) 
  53.         {
  54.             return myDate.toLocaleString();    
  55.         }
  56.         else 
  57.         {
  58.             return this.formatDateTime(this.dateFromUnixTimestamp(myDate));
  59.         }
  60.     },
  61.     
  62.     formatTime: function(time)
  63.     {
  64.         var h = (time - (time % 3600000)) / 3600000;
  65.         time = time - (h * 3600000);
  66.     
  67.         var m = (time - (time % 60000)) / 60000;
  68.         time = time - (m * 60000);
  69.     
  70.         var s = (time - (time % 1000)) / 1000;
  71.         time = time - (s * 1000);
  72.     
  73.         var ms = time;
  74.         
  75.         var string = "";
  76.         
  77.         string += this.lZero(h);
  78.         string += ":" + this.lZero(m);
  79.         string += ":" + this.lZero(s);
  80.         string += "." + this.pad(ms, 3);
  81.         
  82.         return string;
  83.     },
  84.     
  85.     lZero: function(x) 
  86.     {    
  87.         // after Dietmar Meier
  88.         return (-x > -10 && x >= 0 && "0" || "") + x;
  89.     },
  90.     
  91.     pad: function(val, len)
  92.     {
  93.         val = String(val);
  94.         len = len || 2;
  95.         while (val.length < len) val = "0" + val;
  96.         return val;
  97.     },
  98.     
  99.     // size functions
  100.     humanizeSize: function(size, displayUntil)
  101.     {
  102.         var hsize = size;
  103.         var hchar = "";
  104.         var dotPos = -1;
  105.         if (displayUntil == "undefined") 
  106.         {
  107.             displayUntil = 3;
  108.         }
  109.         
  110.         if (size > 1073741824 && displayUntil <= 9)
  111.         {
  112.             hsize = size / 1073741824;
  113.             hchar = "G";
  114.         }
  115.         
  116.         if (size > 1048576 && displayUntil <= 6)
  117.         {
  118.             hsize = size / 1048576;
  119.             hchar = "M";
  120.         }
  121.         
  122.         if (size > 1024 && displayUntil <= 3)
  123.         {
  124.             hsize = size / 1024;
  125.             hchar = "k";
  126.         }
  127.         
  128.         hsize = hsize.toString();
  129.         
  130.         if ((dotPos = hsize.indexOf(".")) != -1)
  131.         {
  132.             hsize = hsize.substring(0, dotPos + 2);
  133.         }
  134.         
  135.         return hsize + hchar;
  136.     },
  137.     
  138.     // Utility function, dump an object by reflexion up to niv level
  139.     dumpall: function(name, obj, niv) 
  140.     {
  141.         if (!niv) {
  142.             niv=1;
  143.         }
  144.         var dumpdict = new Object();
  145.     
  146.         dump ("\n\n-------------------------------------------------------\n");
  147.         dump ("Dump of the object: " + name + " (" + niv + " levels)\n");
  148.         dump ("Address: " + obj + "\n");
  149.         dump ("Interfaces: ");
  150.         
  151.         for (var i in Components.interfaces) 
  152.         {
  153.             try 
  154.             {
  155.                 obj.QueryInterface(Components.interfaces[i]);
  156.                 dump("" + Components.interfaces[i] + ", ");
  157.             } 
  158.             catch(ex) 
  159.             {}
  160.         }
  161.         dump("\n");
  162.         this._dumpall(dumpdict,obj,niv,"","");
  163.         dump ("\n\n-------------------------------------------------------\n\n");
  164.     
  165.         for (i in dumpdict) 
  166.         {
  167.             delete dumpdict[i];
  168.         }
  169.     },
  170.     
  171.     _dumpall: function(dumpdict, obj, niv, tab, path) 
  172.     {
  173.         if (obj in dumpdict) 
  174.         {
  175.             dump(" (Already dumped)");
  176.         } 
  177.         else 
  178.         {
  179.             dumpdict[obj]=1;
  180.             
  181.             var i, r, str, typ;
  182.             for (i in obj) 
  183.             {
  184.                 try 
  185.                 {
  186.                     str = String(obj[i]).replace(/\n/g, "\n" + tab);
  187.                 } 
  188.                 catch(ex) 
  189.                 {
  190.                     str = String(ex);
  191.                 }
  192.                 try 
  193.                 {
  194.                     typ = "" + typeof(obj[i]);
  195.                 } 
  196.                 catch(ex) 
  197.                 {
  198.                     typ = "unknown";
  199.                 }
  200.                 dump ("\n" + tab + i + " (" + typ + (path ? ", " + path : "") + "): " + str);
  201.                 if ((niv > 1) && (typ == "object")) 
  202.                 {
  203.                     this._dumpall(dumpdict, obj[i], niv-1, tab + "\t", (path ? path + "->" + i : i));
  204.                 }
  205.             }
  206.         }
  207.     },
  208.     // ************************************************************************************************
  209.     
  210.     stripNewlines: function(text)
  211.     {
  212.         return text.replace(/(\r\n|\r|\n)/, "");
  213.     },
  214.     
  215.     isXml: function(text)
  216.     {
  217.         if (text.match(/<\?xml[^\?>]*\?>/i))
  218.         {
  219.             // xml header found
  220.             return true;
  221.         }
  222.         
  223.         return this.stripNewlines(text).match(/<([^> ]+)( [^>]+)*>.*<\/\1>|<[^>]+\/>/i);
  224.     },
  225.     
  226.     isContentTypeXml: function(typestring)
  227.     {
  228.         if (typestring.indexOf("xml") != -1) 
  229.         {
  230.             return true;
  231.         }
  232.         
  233.         if (typestring.indexOf("rdf") != -1) 
  234.         {
  235.             return true;
  236.         }
  237.         
  238.         if (typestring.indexOf("dtd") != -1) 
  239.         {
  240.             return true;
  241.         }
  242.         
  243.         return false;
  244.     },
  245.     
  246.     // from live http headers:
  247.     // Utility function to save data to clipboard
  248.     toClipboard: function(data)
  249.     {
  250.         if (data) 
  251.         {
  252.             // clipboard helper
  253.             try
  254.             {
  255.                 const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
  256.                 clipboardHelper.copyString(data);
  257.             } 
  258.             catch(ex) 
  259.             {
  260.                   // do nothing, later code will handle the error
  261.                 dump("Unable to get the clipboard helper\n");
  262.             }
  263.           }
  264.     },
  265.     
  266.     // Utility function to save data to a file
  267.     /*saveAs: function(data, title)
  268.     {
  269.         if (!title) title = "LiveHTTPHeaders";
  270.         const MODE =  0x2A; // MODE_WRONLY | MODE_CREATE | MODE_TRUNCAT
  271.         const PERM = 00644; // PERM_IRUSR | PERM_IWUSR | PERM_IRGRP | PERM_IROTH
  272.         const PICKER_CTRID = "@mozilla.org/filepicker;1";
  273.         const FILEOUT_CTRID = "@mozilla.org/network/file-output-stream;1";
  274.         const nsIFilePicker = Components.interfaces.nsIFilePicker;
  275.         const nsIFileOutputStream = Components.interfaces.nsIFileOutputStream;
  276.     
  277.         try 
  278.         {
  279.             var picker = Components.classes[PICKER_CTRID].createInstance(nsIFilePicker);
  280.             picker.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
  281.             picker.init (window, title, Components.interfaces.nsIFilePicker.modeSave);
  282.             var rv = picker.show();
  283.     
  284.             if (rv != Components.interfaces.nsIFilePicker.returnCancel) 
  285.             {
  286.                 var os = Components.classes[FILEOUT_CTRID].createInstance(nsIFileOutputStream);
  287.                 os.init(picker.file, MODE, PERM, 0);
  288.                 os.write(data, data.length);
  289.             }
  290.         } 
  291.         catch(ex)
  292.         {
  293.             alert(ex);
  294.         }
  295.     },*/
  296.     // ************************************************************************************************
  297.     
  298.     openWindow: function(windowType, url, features, params)
  299.     {
  300.         var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
  301.     
  302.         var win = windowType ? wm.getMostRecentWindow(windowType) : null;
  303.         if (win) 
  304.         {
  305.             if ("initWithParams" in win)
  306.             {
  307.                 win.initWithParams(aParams);
  308.             }
  309.             win.focus();
  310.         }
  311.         else 
  312.         {
  313.             var winFeatures = "resizable,dialog=no,centerscreen" + (features != "" ? ("," + features) : "");
  314.             var parentWindow = (!window.opener || window.opener.closed) ? window : window.opener;
  315.             win = parentWindow.openDialog(url, "_blank", winFeatures, params);
  316.         }
  317.         return win;
  318.     },
  319.     
  320.     urlDecode: function(value)
  321.     {
  322.         var decoded = value.replace(/\+/g, " ");
  323.         decoded = unescape(decoded);
  324.         
  325.         return decoded;
  326.     },
  327.     
  328.     nsResultErrors:
  329.     {
  330.         "c1f30000": "NS_ERROR_BASE",
  331.         "80004001": "NS_ERROR_NOT_IMPLEMENTED",
  332.         "80004003": "NS_ERROR_INVALID_POINTER",
  333.         "80004004": "NS_ERROR_ABORT",
  334.         "80004005": "NS_ERROR_FAILURE",
  335.         "8000ffff": "NS_ERROR_UNEXPECTED",
  336.         "80010010": "NS_ERROR_PROXY_INVALID_IN_PARAMETER",
  337.         "80010011": "NS_ERROR_PROXY_INVALID_OUT_PARAMETER",
  338.         "80040110": "NS_ERROR_NO_AGGREGATION",
  339.         "80040111": "NS_ERROR_NOT_AVAILABLE",
  340.         "80040154": "NS_ERROR_FACTORY_NOT_REGISTERED",
  341.         "80040155": "NS_ERROR_FACTORY_REGISTER_AGAIN",
  342.         "800401f8": "NS_ERROR_FACTORY_NOT_LOADED",
  343.         "8007000e": "NS_ERROR_OUT_OF_MEMORY",
  344.         "80070057": "NS_ERROR_ILLEGAL_VALUE",
  345.         "80460001": "NS_ERROR_CANNOT_CONVERT_DATA",
  346.         "80460002": "NS_ERROR_OBJECT_IS_IMMUTABLE",
  347.         "80460003": "NS_ERROR_LOSS_OF_SIGNIFICANT_DATA",
  348.         "80460016": "NS_ERROR_SERVICE_NOT_AVAILABLE",
  349.         "80460018": "NS_ERROR_IS_DIR",
  350.         "8046001e": "NS_ERROR_ILLEGAL_DURING_SHUTDOWN",
  351.         "80470002": "NS_BASE_STREAM_CLOSED",
  352.         "80470003": "NS_BASE_STREAM_OSERROR",
  353.         "80470004": "NS_BASE_STREAM_ILLEGAL_ARGS",
  354.         "80470005": "NS_BASE_STREAM_NO_CONVERTER",
  355.         "80470006": "NS_BASE_STREAM_BAD_CONVERSION",
  356.         "80470007": "NS_BASE_STREAM_WOULD_BLOCK",
  357.         "80480002": "NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND",
  358.         "80480003": "NS_ERROR_GFX_PRINTER_CMD_FAILURE",
  359.         "80480004": "NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE",
  360.         "80480005": "NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND",
  361.         "80480006": "NS_ERROR_GFX_PRINTER_ACCESS_DENIED",
  362.         "80480007": "NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE",
  363.         "80480009": "NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY",
  364.         "8048000a": "NS_ERROR_GFX_PRINTER_OUT_OF_PAPER",
  365.         "8048000b": "NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR",
  366.         "8048000c": "NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE",
  367.         "8048000d": "NS_ERROR_GFX_PRINTER_FILE_IO_ERROR",
  368.         "8048000e": "NS_ERROR_GFX_PRINTER_PRINTPREVIEW",
  369.         "8048000f": "NS_ERROR_GFX_PRINTER_STARTDOC",
  370.         "80480010": "NS_ERROR_GFX_PRINTER_ENDDOC",
  371.         "80480011": "NS_ERROR_GFX_PRINTER_STARTPAGE",
  372.         "80480012": "NS_ERROR_GFX_PRINTER_ENDPAGE",
  373.         "80480013": "NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW",
  374.         "80480014": "NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED",
  375.         "80480015": "NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED",
  376.         "80480016": "NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED",
  377.         "80480017": "NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES",
  378.         "80480018": "NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR",
  379.         "80480019": "NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP",
  380.         "8048001a": "NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED",
  381.         "8048001b": "NS_ERROR_GFX_PRINTER_NO_XUL",
  382.         "8048001c": "NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT",
  383.         "8048001d": "NS_ERROR_GFX_NO_PRINTROMPTSERVICE",
  384.         "8048001e": "NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED",
  385.         "8048001f": "NS_ERROR_GFX_PRINTER_DOC_IS_BUSY",
  386.         "80480020": "NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED",
  387.         "80480021": "NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE",
  388.         "80480022": "NS_ERROR_GFX_PRINTER_RESOLUTION_NOT_SUPPORTED",
  389.         "804b0001": "NS_BINDING_FAILED",
  390.         "804b0002": "NS_BINDING_ABORTED",
  391.         "804b0003": "NS_BINDING_REDIRECTED",
  392.         "804b0004": "NS_BINDING_RETARGETED",
  393.         "804b000a": "NS_ERROR_MALFORMED_URI",
  394.         "804b000b": "NS_ERROR_ALREADY_CONNECTED",
  395.         "804b000c": "NS_ERROR_NOT_CONNECTED",
  396.         "804b000d": "NS_ERROR_CONNECTION_REFUSED",
  397.         "804b000e": "NS_ERROR_NET_TIMEOUT",
  398.         "804b000f": "NS_ERROR_IN_PROGRESS",
  399.         "804b0010": "NS_ERROR_OFFLINE",
  400.         "804b0011": "NS_ERROR_NO_CONTENT",
  401.         "804b0012": "NS_ERROR_UNKNOWN_PROTOCOL",
  402.         "804b0013": "NS_ERROR_PORT_ACCESS_NOT_ALLOWED",
  403.         "804b0014": "NS_ERROR_NET_RESET",
  404.         "804b0015": "NS_ERROR_FTP_LOGIN",
  405.         "804b0016": "NS_ERROR_FTP_CWD",
  406.         "804b0017": "NS_ERROR_FTP_PASV",
  407.         "804b0018": "NS_ERROR_FTP_PWD",
  408.         "804b0019": "NS_ERROR_NOT_RESUMABLE",
  409.         "804b001b": "NS_ERROR_INVALID_CONTENT_ENCODING",
  410.         "804b001c": "NS_ERROR_FTP_LIST",
  411.         "804b001e": "NS_ERROR_UNKNOWN_HOST",
  412.         "804b001f": "NS_ERROR_REDIRECT_LOOP",
  413.         "804b0020": "NS_ERROR_ENTITY_CHANGED",
  414.         "804b002a": "NS_ERROR_UNKNOWN_PROXY_HOST",
  415.         "804b0033": "NS_ERROR_UNKNOWN_SOCKET_TYPE",
  416.         "804b0034": "NS_ERROR_SOCKET_CREATE_FAILED",
  417.         "804b003d": "NS_ERROR_CACHE_KEY_NOT_FOUND",
  418.         "804b003e": "NS_ERROR_CACHE_DATA_IS_STREAM",
  419.         "804b003f": "NS_ERROR_CACHE_DATA_IS_NOT_STREAM",
  420.         "804b0040": "NS_ERROR_CACHE_WAIT_FOR_VALIDATION",
  421.         "804b0041": "NS_ERROR_CACHE_ENTRY_DOOMED",
  422.         "804b0042": "NS_ERROR_CACHE_READ_ACCESS_DENIED",
  423.         "804b0043": "NS_ERROR_CACHE_WRITE_ACCESS_DENIED",
  424.         "804b0044": "NS_ERROR_CACHE_IN_USE",
  425.         "804b0046": "NS_ERROR_DOCUMENT_NOT_CACHED",
  426.         "804b0047": "NS_ERROR_NET_INTERRUPT",
  427.         "804b0048": "NS_ERROR_PROXY_CONNECTION_REFUSED",
  428.         "804b0049": "NS_ERROR_ALREADY_OPENED",
  429.         "804b004a": "NS_ERROR_UNSAFE_CONTENT_TYPE",
  430.         "804b0050": "NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS",
  431.         "804b0051": "NS_ERROR_HOST_IS_IP_ADDRESS",
  432.         "804c03e8": "NS_ERROR_PLUGINS_PLUGINSNOTCHANGED",
  433.         "804c03e9": "NS_ERROR_PLUGIN_DISABLED",
  434.         "804c03ea": "NS_ERROR_PLUGIN_BLOCKLISTED",
  435.         "804e03e8": "NS_ERROR_HTMLPARSER_EOF",
  436.         "804e03e9": "NS_ERROR_HTMLPARSER_UNKNOWN",
  437.         "804e03ea": "NS_ERROR_HTMLPARSER_CANTPROPAGATE",
  438.         "804e03eb": "NS_ERROR_HTMLPARSER_CONTEXTMISMATCH",
  439.         "804e03ec": "NS_ERROR_HTMLPARSER_BADFILENAME",
  440.         "804e03ed": "NS_ERROR_HTMLPARSER_BADURL",
  441.         "804e03ee": "NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT",
  442.         "804e03ef": "NS_ERROR_HTMLPARSER_INTERRUPTED",
  443.         "804e03f0": "NS_ERROR_HTMLPARSER_BLOCK",
  444.         "804e03f1": "NS_ERROR_HTMLPARSER_BADTOKENIZER",
  445.         "804e03f2": "NS_ERROR_HTMLPARSER_BADATTRIBUTE",
  446.         "804e03f3": "NS_ERROR_HTMLPARSER_UNRESOLVEDDTD",
  447.         "804e03f4": "NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT",
  448.         "804e03f5": "NS_ERROR_HTMLPARSER_BADDTD",
  449.         "804e03f6": "NS_ERROR_HTMLPARSER_BADCONTEXT",
  450.         "804e03f7": "NS_ERROR_HTMLPARSER_STOPPARSING",
  451.         "804e03f8": "NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL",
  452.         "804e03f9": "NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP",
  453.         "804e03fa": "NS_ERROR_HTMLPARSER_FAKE_ENDTAG",
  454.         "804e03fb": "NS_ERROR_HTMLPARSER_INVALID_COMMENT",
  455.         "80500001": "NS_ERROR_UCONV_NOCONV",
  456.         "8050000e": "NS_ERROR_UDEC_ILLEGALINPUT",
  457.         "8050000e": "NS_ERROR_ILLEGAL_INPUT",
  458.         "80510001": "NS_ERROR_REG_BADTYPE",
  459.         "80510001": "NS_ERROR_REG_BADTYPE",
  460.         "80510003": "NS_ERROR_REG_NOT_FOUND",
  461.         "80510003": "NS_ERROR_REG_NOT_FOUND",
  462.         "80510004": "NS_ERROR_REG_NOFILE",
  463.         "80510004": "NS_ERROR_REG_NOFILE",
  464.         "80510005": "NS_ERROR_REG_BUFFER_TOO_SMALL",
  465.         "80510005": "NS_ERROR_REG_BUFFER_TOO_SMALL",
  466.         "80510006": "NS_ERROR_REG_NAME_TOO_LONG",
  467.         "80510006": "NS_ERROR_REG_NAME_TOO_LONG",
  468.         "80510007": "NS_ERROR_REG_NO_PATH",
  469.         "80510007": "NS_ERROR_REG_NO_PATH",
  470.         "80510008": "NS_ERROR_REG_READ_ONLY",
  471.         "80510008": "NS_ERROR_REG_READ_ONLY",
  472.         "80510009": "NS_ERROR_REG_BAD_UTF8",
  473.         "80510009": "NS_ERROR_REG_BAD_UTF8",
  474.         "80520001": "NS_ERROR_FILE_UNRECOGNIZED_PATH",
  475.         "80520002": "NS_ERROR_FILE_UNRESOLVABLE_SYMLINK",
  476.         "80520003": "NS_ERROR_FILE_EXECUTION_FAILED",
  477.         "80520004": "NS_ERROR_FILE_UNKNOWN_TYPE",
  478.         "80520005": "NS_ERROR_FILE_DESTINATION_NOT_DIR",
  479.         "80520006": "NS_ERROR_FILE_TARGET_DOES_NOT_EXIST",
  480.         "80520007": "NS_ERROR_FILE_COPY_OR_MOVE_FAILED",
  481.         "80520008": "NS_ERROR_FILE_ALREADY_EXISTS",
  482.         "80520009": "NS_ERROR_FILE_INVALID_PATH",
  483.         "8052000a": "NS_ERROR_FILE_DISK_FULL",
  484.         "8052000b": "NS_ERROR_FILE_CORRUPTED",
  485.         "8052000c": "NS_ERROR_FILE_NOT_DIRECTORY",
  486.         "8052000d": "NS_ERROR_FILE_IS_DIRECTORY",
  487.         "8052000e": "NS_ERROR_FILE_IS_LOCKED",
  488.         "8052000f": "NS_ERROR_FILE_TOO_BIG",
  489.         "80520010": "NS_ERROR_FILE_NO_DEVICE_SPACE",
  490.         "80520011": "NS_ERROR_FILE_NAME_TOO_LONG",
  491.         "80520012": "NS_ERROR_FILE_NOT_FOUND",
  492.         "80520013": "NS_ERROR_FILE_READ_ONLY",
  493.         "80520014": "NS_ERROR_FILE_DIR_NOT_EMPTY",
  494.         "80520015": "NS_ERROR_FILE_ACCESS_DENIED",
  495.         "80530001": "NS_ERROR_DOM_INDEX_SIZE_ERR",
  496.         "80530002": "NS_ERROR_DOM_DOMSTRING_SIZE_ERR",
  497.         "80530003": "NS_ERROR_DOM_HIERARCHY_REQUEST_ERR",
  498.         "80530004": "NS_ERROR_DOM_WRONG_DOCUMENT_ERR",
  499.         "80530005": "NS_ERROR_DOM_INVALID_CHARACTER_ERR",
  500.         "80530006": "NS_ERROR_DOM_NO_DATA_ALLOWED_ERR",
  501.         "80530007": "NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR",
  502.         "80530008": "NS_ERROR_DOM_NOT_FOUND_ERR",
  503.         "80530009": "NS_ERROR_DOM_NOT_SUPPORTED_ERR",
  504.         "8053000a": "NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR",
  505.         "8053000b": "NS_ERROR_DOM_INVALID_STATE_ERR",
  506.         "8053000c": "NS_ERROR_DOM_SYNTAX_ERR",
  507.         "8053000d": "NS_ERROR_DOM_INVALID_MODIFICATION_ERR",
  508.         "8053000e": "NS_ERROR_DOM_NAMESPACE_ERR",
  509.         "8053000f": "NS_ERROR_DOM_INVALID_ACCESS_ERR",
  510.         "80530010": "NS_ERROR_DOM_VALIDATION_ERR",
  511.         "80530011": "NS_ERROR_DOM_TYPE_MISMATCH_ERR",
  512.         "805303e8": "NS_ERROR_DOM_SECURITY_ERR",
  513.         "805303e9": "NS_ERROR_DOM_SECMAN_ERR",
  514.         "805303ea": "NS_ERROR_DOM_WRONG_TYPE_ERR",
  515.         "805303eb": "NS_ERROR_DOM_NOT_OBJECT_ERR",
  516.         "805303ec": "NS_ERROR_DOM_NOT_XPC_OBJECT_ERR",
  517.         "805303ed": "NS_ERROR_DOM_NOT_NUMBER_ERR",
  518.         "805303ee": "NS_ERROR_DOM_NOT_BOOLEAN_ERR",
  519.         "805303ef": "NS_ERROR_DOM_NOT_FUNCTION_ERR",
  520.         "805303f0": "NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR",
  521.         "805303f1": "NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN",
  522.         "805303f2": "NS_ERROR_DOM_PROP_ACCESS_DENIED",
  523.         "805303f3": "NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED",
  524.         "805303f4": "NS_ERROR_DOM_BAD_URI",
  525.         "805303f5": "NS_ERROR_DOM_RETVAL_UNDEFINED",
  526.         "805303f6": "NS_ERROR_DOM_QUOTA_REACHED",
  527.         "80540005": "NS_IMAGELIB_ERROR_FAILURE",
  528.         "80540006": "NS_IMAGELIB_ERROR_NO_DECODER",
  529.         "80540007": "NS_IMAGELIB_ERROR_NOT_FINISHED",
  530.         "80540008": "NS_IMAGELIB_ERROR_LOAD_ABORTED",
  531.         "80540009": "NS_IMAGELIB_ERROR_NO_ENCODER",
  532.         "80560001": "NS_ERROR_EDITOR_NO_SELECTION",
  533.         "80560002": "NS_ERROR_EDITOR_NO_TEXTNODE",
  534.         "80560003": "NS_FOUND_TARGET",
  535.         "805800c8": "NS_ERROR_LAUNCHED_CHILD_PROCESS",
  536.         "80590001": "NS_ERROR_LDAP_OPERATIONS_ERROR",
  537.         "80590002": "NS_ERROR_LDAP_PROTOCOL_ERROR",
  538.         "80590003": "NS_ERROR_LDAP_TIMELIMIT_EXCEEDED",
  539.         "80590004": "NS_ERROR_LDAP_SIZELIMIT_EXCEEDED",
  540.         "80590005": "NS_ERROR_LDAP_COMPARE_FALSE",
  541.         "80590006": "NS_ERROR_LDAP_COMPARE_TRUE",
  542.         "80590007": "NS_ERROR_LDAP_STRONG_AUTH_NOT_SUPPORTED",
  543.         "80590008": "NS_ERROR_LDAP_STRONG_AUTH_REQUIRED",
  544.         "80590009": "NS_ERROR_LDAP_PARTIAL_RESULTS",
  545.         "8059000a": "NS_ERROR_LDAP_REFERRAL",
  546.         "8059000b": "NS_ERROR_LDAP_ADMINLIMIT_EXCEEDED",
  547.         "8059000c": "NS_ERROR_LDAP_UNAVAILABLE_CRITICAL_EXTENSION",
  548.         "8059000d": "NS_ERROR_LDAP_CONFIDENTIALITY_REQUIRED",
  549.         "8059000e": "NS_ERROR_LDAP_SASL_BIND_IN_PROGRESS",
  550.         "80590010": "NS_ERROR_LDAP_NO_SUCH_ATTRIBUTE",
  551.         "80590011": "NS_ERROR_LDAP_UNDEFINED_TYPE",
  552.         "80590012": "NS_ERROR_LDAP_INAPPROPRIATE_MATCHING",
  553.         "80590013": "NS_ERROR_LDAP_CONSTRAINT_VIOLATION",
  554.         "80590014": "NS_ERROR_LDAP_TYPE_OR_VALUE_EXISTS",
  555.         "80590015": "NS_ERROR_LDAP_INVALID_SYNTAX",
  556.         "80590020": "NS_ERROR_LDAP_NO_SUCH_OBJECT",
  557.         "80590021": "NS_ERROR_LDAP_ALIAS_PROBLEM",
  558.         "80590022": "NS_ERROR_LDAP_INVALID_DN_SYNTAX",
  559.         "80590023": "NS_ERROR_LDAP_IS_LEAF",
  560.         "80590024": "NS_ERROR_LDAP_ALIAS_DEREF_PROBLEM",
  561.         "80590030": "NS_ERROR_LDAP_INAPPROPRIATE_AUTH",
  562.         "80590031": "NS_ERROR_LDAP_INVALID_CREDENTIALS",
  563.         "80590032": "NS_ERROR_LDAP_INSUFFICIENT_ACCESS",
  564.         "80590033": "NS_ERROR_LDAP_BUSY",
  565.         "80590034": "NS_ERROR_LDAP_UNAVAILABLE",
  566.         "80590035": "NS_ERROR_LDAP_UNWILLING_TO_PERFORM",
  567.         "80590036": "NS_ERROR_LDAP_LOOP_DETECT",
  568.         "8059003c": "NS_ERROR_LDAP_SORT_CONTROL_MISSING",
  569.         "8059003d": "NS_ERROR_LDAP_INDEX_RANGE_ERROR",
  570.         "80590040": "NS_ERROR_LDAP_NAMING_VIOLATION",
  571.         "80590041": "NS_ERROR_LDAP_OBJECT_CLASS_VIOLATION",
  572.         "80590042": "NS_ERROR_LDAP_NOT_ALLOWED_ON_NONLEAF",
  573.         "80590043": "NS_ERROR_LDAP_NOT_ALLOWED_ON_RDN",
  574.         "80590044": "NS_ERROR_LDAP_ALREADY_EXISTS",
  575.         "80590045": "NS_ERROR_LDAP_NO_OBJECT_CLASS_MODS",
  576.         "80590046": "NS_ERROR_LDAP_RESULTS_TOO_LARGE",
  577.         "80590047": "NS_ERROR_LDAP_AFFECTS_MULTIPLE_DSAS",
  578.         "80590050": "NS_ERROR_LDAP_OTHER",
  579.         "80590051": "NS_ERROR_LDAP_SERVER_DOWN",
  580.         "80590052": "NS_ERROR_LDAP_LOCAL_ERROR",
  581.         "80590053": "NS_ERROR_LDAP_ENCODING_ERROR",
  582.         "80590054": "NS_ERROR_LDAP_DECODING_ERROR",
  583.         "80590055": "NS_ERROR_LDAP_TIMEOUT",
  584.         "80590056": "NS_ERROR_LDAP_AUTH_UNKNOWN",
  585.         "80590057": "NS_ERROR_LDAP_FILTER_ERROR",
  586.         "80590058": "NS_ERROR_LDAP_USER_CANCELLED",
  587.         "80590059": "NS_ERROR_LDAP_PARAM_ERROR",
  588.         "8059005a": "NS_ERROR_LDAP_NO_MEMORY",
  589.         "8059005b": "NS_ERROR_LDAP_CONNECT_ERROR",
  590.         "8059005c": "NS_ERROR_LDAP_NOT_SUPPORTED",
  591.         "8059005d": "NS_ERROR_LDAP_CONTROL_NOT_FOUND",
  592.         "8059005e": "NS_ERROR_LDAP_NO_RESULTS_RETURNED",
  593.         "8059005f": "NS_ERROR_LDAP_MORE_RESULTS_TO_RETURN",
  594.         "80590060": "NS_ERROR_LDAP_CLIENT_LOOP",
  595.         "80590061": "NS_ERROR_LDAP_REFERRAL_LIMIT_EXCEEDED",
  596.         "805a0400": "NS_ERROR_CMS_VERIFY_NOT_SIGNED",
  597.         "805a0401": "NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO",
  598.         "805a0402": "NS_ERROR_CMS_VERIFY_BAD_DIGEST",
  599.         "805a0404": "NS_ERROR_CMS_VERIFY_NOCERT",
  600.         "805a0405": "NS_ERROR_CMS_VERIFY_UNTRUSTED",
  601.         "805a0407": "NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED",
  602.         "805a0408": "NS_ERROR_CMS_VERIFY_ERROR_PROCESSING",
  603.         "805a0409": "NS_ERROR_CMS_VERIFY_BAD_SIGNATURE",
  604.         "805a040a": "NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH",
  605.         "805a040b": "NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO",
  606.         "805a040c": "NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO",
  607.         "805a040d": "NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE",
  608.         "805a040e": "NS_ERROR_CMS_VERIFY_HEADER_MISMATCH",
  609.         "805a040f": "NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED",
  610.         "805a0410": "NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS",
  611.         "805a0420": "NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG",
  612.         "805a0421": "NS_ERROR_CMS_ENCRYPT_INCOMPLETE",
  613.         "805b0033": "NS_ERROR_DOM_INVALID_EXPRESSION_ERR",
  614.         "805b0034": "NS_ERROR_DOM_TYPE_ERR",
  615.         "805c0001": "NS_ERROR_DOM_RANGE_BAD_BOUNDARYPOINTS_ERR",
  616.         "805c0002": "NS_ERROR_DOM_RANGE_INVALID_NODE_TYPE_ERR",
  617.         "805d0001": "NS_ERROR_WONT_HANDLE_CONTENT",
  618.         "805d001e": "NS_ERROR_MALWARE_URI",
  619.         "805d001f": "NS_ERROR_PHISHING_URI",
  620.         "805e0008": "NS_ERROR_IMAGE_SRC_CHANGED",
  621.         "805e0009": "NS_ERROR_IMAGE_BLOCKED",
  622.         "805e000a": "NS_ERROR_CONTENT_BLOCKED",
  623.         "805e000b": "NS_ERROR_CONTENT_BLOCKED_SHOW_ALT",
  624.         "805e000e": "NS_PROPTABLE_PROP_NOT_THERE",
  625.         "80600001": "TM_ERROR",
  626.         "80600001": "NS_ERROR_XSLT_PARSE_FAILURE",
  627.         "80600002": "TM_ERROR_WRONG_QUEUE",
  628.         "80600002": "NS_ERROR_XPATH_PARSE_FAILURE",
  629.         "80600003": "TM_ERROR_NOT_POSTED",
  630.         "80600003": "NS_ERROR_XSLT_ALREADY_SET",
  631.         "80600004": "TM_ERROR_QUEUE_EXISTS",
  632.         "80600004": "NS_ERROR_XSLT_EXECUTION_FAILURE",
  633.         "80600005": "NS_ERROR_XPATH_UNKNOWN_FUNCTION",
  634.         "80600006": "TM_SUCCESS_DELETE_QUEUE",
  635.         "80600006": "NS_ERROR_XSLT_BAD_RECURSION",
  636.         "80600007": "NS_ERROR_XSLT_BAD_VALUE",
  637.         "80600008": "NS_ERROR_XSLT_NODESET_EXPECTED",
  638.         "80600009": "NS_ERROR_XSLT_ABORTED",
  639.         "8060000a": "NS_ERROR_XSLT_NETWORK_ERROR",
  640.         "8060000b": "NS_ERROR_XSLT_WRONG_MIME_TYPE",
  641.         "8060000c": "NS_ERROR_XSLT_LOAD_RECURSION",
  642.         "8060000d": "NS_ERROR_XPATH_BAD_ARGUMENT_COUNT",
  643.         "8060000e": "NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION",
  644.         "8060000f": "NS_ERROR_XPATH_PAREN_EXPECTED",
  645.         "80600010": "NS_ERROR_XPATH_INVALID_AXIS",
  646.         "80600011": "NS_ERROR_XPATH_NO_NODE_TYPE_TEST",
  647.         "80600012": "NS_ERROR_XPATH_BRACKET_EXPECTED",
  648.         "80600013": "NS_ERROR_XPATH_INVALID_VAR_NAME",
  649.         "80600014": "NS_ERROR_XPATH_UNEXPECTED_END",
  650.         "80600015": "NS_ERROR_XPATH_OPERATOR_EXPECTED",
  651.         "80600016": "NS_ERROR_XPATH_UNCLOSED_LITERAL",
  652.         "80600017": "NS_ERROR_XPATH_BAD_COLON",
  653.         "80600018": "NS_ERROR_XPATH_BAD_BANG",
  654.         "80600019": "NS_ERROR_XPATH_ILLEGAL_CHAR",
  655.         "8060001a": "NS_ERROR_XPATH_BINARY_EXPECTED",
  656.         "8060001b": "NS_ERROR_XSLT_LOAD_BLOCKED_ERROR",
  657.         "8060001c": "NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED",
  658.         "8060001d": "NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE",
  659.         "8060001e": "NS_ERROR_XSLT_BAD_NODE_NAME",
  660.         "8060001f": "NS_ERROR_XSLT_VAR_ALREADY_SET",
  661.         "80620000": "NS_ERROR_DOM_SVG_WRONG_TYPE_ERR",
  662.         "80620001": "NS_ERROR_DOM_SVG_INVALID_VALUE_ERR",
  663.         "80620002": "NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE",
  664.         "80630001": "MOZ_ERROR_STORAGE_ERROR",
  665.         "80640001": "NS_ERROR_SCHEMAVALIDATOR_NO_SCHEMA_LOADED",
  666.         "80640002": "NS_ERROR_SCHEMAVALIDATOR_NO_DOM_NODE_SPECIFIED",
  667.         "80640003": "NS_ERROR_SCHEMAVALIDATOR_NO_TYPE_FOUND",
  668.         "80640004": "NS_ERROR_SCHEMAVALIDATOR_TYPE_NOT_FOUND",
  669.         "80650000": "NS_ERROR_DOM_FILE_NOT_FOUND_ERR",
  670.         "80650001": "NS_ERROR_DOM_FILE_NOT_READABLE_ERR",
  671.         "80780001": "NS_ERROR_WSDL_NOT_WSDL_ELEMENT",
  672.         "80780001": "NS_ERROR_SCHEMA_NOT_SCHEMA_ELEMENT",
  673.         "80780001": "NS_ERROR_SCHEMA_NOT_SCHEMA_ELEMENT",
  674.         "80780001": "NS_ERROR_DOWNLOAD_COMPLETE",
  675.         "80780002": "NS_ERROR_WSDL_SCHEMA_PROCESSING_ERROR",
  676.         "80780002": "NS_ERROR_SCHEMA_UNKNOWN_TARGET_NAMESPACE",
  677.         "80780002": "NS_ERROR_SCHEMA_UNKNOWN_TARGET_NAMESPACE",
  678.         "80780002": "NS_ERROR_DOWNLOAD_NOT_PARTIAL",
  679.         "80780003": "NS_ERROR_WSDL_BINDING_NOT_FOUND",
  680.         "80780003": "NS_ERROR_SCHEMA_UNKNOWN_TYPE",
  681.         "80780003": "NS_ERROR_SCHEMA_UNKNOWN_TYPE",
  682.         "80780004": "NS_ERROR_WSDL_UNKNOWN_SCHEMA_COMPONENT",
  683.         "80780004": "NS_ERROR_SCHEMA_UNKNOWN_PREFIX",
  684.         "80780004": "NS_ERROR_SCHEMA_UNKNOWN_PREFIX",
  685.         "80780005": "NS_ERROR_WSDL_UNKNOWN_WSDL_COMPONENT",
  686.         "80780005": "NS_ERROR_SCHEMA_INVALID_STRUCTURE",
  687.         "80780005": "NS_ERROR_SCHEMA_INVALID_STRUCTURE",
  688.         "80780006": "NS_ERROR_WSDL_LOADING_ERROR",
  689.         "80780006": "NS_ERROR_SCHEMA_INVALID_TYPE_USAGE",
  690.         "80780006": "NS_ERROR_SCHEMA_INVALID_TYPE_USAGE",
  691.         "80780007": "NS_ERROR_WSDL_RECURSIVE_IMPORT",
  692.         "80780007": "NS_ERROR_SCHEMA_MISSING_TYPE",
  693.         "80780007": "NS_ERROR_SCHEMA_MISSING_TYPE",
  694.         "80780008": "NS_ERROR_WSDL_NOT_ENABLED",
  695.         "80780008": "NS_ERROR_SCHEMA_FACET_VALUE_ERROR",
  696.         "80780008": "NS_ERROR_SCHEMA_FACET_VALUE_ERROR",
  697.         "80780009": "NS_ERROR_SCHEMA_LOADING_ERROR",
  698.         "80780009": "NS_ERROR_SCHEMA_LOADING_ERROR",
  699.         "8078000a": "IPC_WAIT_NEXT_MESSAGE",
  700.         "80780021": "NS_ERROR_UNORM_MOREOUTPUT",
  701.         "807803e9": "NS_ERROR_WEBSHELL_REQUEST_REJECTED",
  702.         "807807d1": "NS_ERROR_DOCUMENT_IS_PRINTMODE",
  703.         "80780bb9": "NS_ERROR_XFORMS_CALCUATION_EXCEPTION",
  704.         "80780bb9": "NS_ERROR_XFORMS_CALCULATION_EXCEPTION",
  705.         "80780bba": "NS_ERROR_XFORMS_UNION_TYPE"
  706.     }
  707. }
  708. // ************************************************************************************************